package InterlingualHomophones::Controller::Relations;

use strict;
use warnings;
use base 'Catalyst::Controller';

=head1 NAME

InterlingualHomophones::Controller::Relations - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut


=head2 index 

=cut

sub index : Private {
    my ( $self, $c ) = @_;

    $c->response->body('Matched InterlingualHomophones::Controller::Relations in Relations.');
}

=head2 list

Fetch all Utterance objects and pass to relations/utterance.tt2 in stash to be displayed

=cut

sub utterance : Local {
    # Retrieve the usual perl OO '$self' for this object. $c is the Catalyst
    # 'Context' that's used to 'glue together' the various components
    # that make up the application
    my ($self, $c, $command, @arguments) = @_;

    my $db = $c->model('DB');
    
    $c->stash->{phrases} = $db->getall( $db->phrases_all_except_one, 'English', 'blablable' );
    
    $c->stash->{template} = 'relations/utterance.tt2';
}

=head1 AUTHOR

Eugene Grigoriev,,,

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
